﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SARUserControls
{
	/// <summary>
	/// 半透明的保存按钮
	/// </summary>
	public partial class SARTransparentSaveAsBtn : UserControl
	{
		public SARTransparentSaveAsBtn()
		{
			this.InitializeComponent();
		}

        /// <summary>
        /// 按钮单击事件
        /// </summary>
        public event MouseButtonEventHandler SARClick;

        private void mouseCapture_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.girdContent.Margin = new Thickness(1.9881919026374817, 2, 0, 0);
            if (SARClick != null)
            {
                SARClick.Invoke(this, e);
            }
        }

        private void mouseCapture_MouseLeave(object sender, MouseEventArgs e)
        {
            this.girdContent.Margin = new Thickness(0.9881919026374817, 1, 0, 0);
        }

        private void mouseCapture_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            this.girdContent.Margin = new Thickness(0.9881919026374817, 1, 0, 0);
        }
	}
}